<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <head th:include="views/public"/>
</head>
<body>
<div id="vm" class="layui-content">
    <div style="margin-left: 1%;padding-top: 1%">
        <el-form :model="form" ref="form1" :inline="true" label-width="68px">
            <el-form-item label="岗位名称" prop="roleName">
                <el-input   placeholder="请输入岗位名称" v-model="form.roleName"  clearable size="small" class="search-input" @keyup.enter.native="search"/>
            </el-form-item>
            <el-form-item label="状态" prop="status">
                <el-select v-model="form.status"  placeholder="岗位状态" class="search-input"  @change="statusChange" clearable size="small" >
                    <el-option v-for="dict in statusOptions" :key="dict.dictLabel" :label="dict.dictValue" :value="dict.dictLabel"/>
                </el-select>
            </el-form-item>
            <el-form-item>
                <el-button type="primary" icon="el-icon-search" size="mini" @click="search">搜索</el-button>
                <el-button icon="el-icon-refresh" size="mini" @click="reset('form1')">重置</el-button>
                <el-button-group>
                    <el-tooltip class="item" effect="Light" content="添加用户" placement="bottom">
                        <el-button type="primary" size="mini" @click="add" icon="el-icon-plus"></el-button>
                    </el-tooltip>
                    <el-tooltip class="item" effect="Light" content="批量删除" placement="bottom">
                        <el-button type="danger" size="mini" @click="remove"  icon="el-icon-delete"></el-button>
                    </el-tooltip>
                    <!--<el-tooltip class="item" effect="Light" content="批量导入" placement="bottom">
                        <el-button type="primary"   size="mini" icon="el-icon-upload2"></el-button>
                    </el-tooltip>
                    <el-tooltip class="item" effect="Light"  content="不勾选导出全部数据" placement="bottom">
                        <el-button type="primary"   size="mini" @click="exportData" icon="el-icon-download"></el-button>
                    </el-tooltip>-->
                </el-button-group>
            </el-form-item>
        </el-form>
    </div>
    <template>
        <el-table  ref="multipleTable" :data="tableData" tooltip-effect="dark" style="width: 98%;margin-left: 1%" @selection-change="selectionChange">
            <el-table-column type="selection" width="55"> </el-table-column>
            <el-table-column prop="postName" label="岗位名称"> </el-table-column>
            <el-table-column prop="createPeople" label="创建者" > </el-table-column>
            <el-table-column prop="status" label="状态"> </el-table-column>
            <el-table-column prop="createTime" label="创建时间"> </el-table-column>
            <el-table-column fixed="right" label="操作" width="100">
                <template slot-scope="scope">
                    <el-button type="text" size="small" @click="edit(scope.$index, scope.row)">编辑</el-button>
                    <el-button type="text" size="small" @click="remove(scope.row)">删除</el-button>
                </template>
            </el-table-column>
        </el-table>
    </template>
    <!--page-->
    <div class="block" style="padding-top: 1%">
        <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="form.page"
                       :page-sizes="[10, 30, 50, 100, 300]" background :page-size="form.limit" layout="total, sizes, prev, pager, next, jumper"
                       :total="count">
        </el-pagination>
    </div>
    <!--修改-->
    <el-dialog :title="title" width="30%"  :visible.sync="dialogFormVisible">
        <el-form :model="respForm"  ref="respForm" :rules="rules" :label-width="formLabelWidth">
            <el-row>

                <el-col :span="24">
                    <el-form-item label="岗位名称" prop="postName">
                        <el-input v-model="respForm.postName" autocomplete="off"></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="24">
                    <el-form-item label="排序" prop="sort">
                        <el-input v-model="respForm.sort" autocomplete="off"></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="24">
                    <el-form-item label="状态" prop="status">
                        <el-radio-group v-model="respForm.status" size="medium">
                            <el-radio v-for="dict in statusOptions" :label="dict.dictLabel">{{dict.dictValue}}</el-radio>
                        </el-radio-group>
                    </el-form-item>
                </el-col>
                <el-col :span="24">
                    <el-form-item label="备注" prop="remark">
                        <el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="respForm.remark"></el-input>
                    </el-form-item>
                </el-col>
            </el-row>
        </el-form>
        <div slot="footer" class="dialog-footer">
            <el-button @click="dialogFormVisible = false">取 消</el-button>
            <el-button type="primary" @click="submitForm('respForm')">确 定</el-button>
        </div>
    </el-dialog>
</div>
<script th:src="@{/assets/js/sys/post.js}"></script>
</body>

</html>